<?php
	// DATABASE ENTRY
	unset ($db);
	
	if (!($db = @mysql_connect("localhost", "web45", "ocarina."))) {
		// die("Cannot connect to database"); 
	}
	if (!mysql_select_db("usr_web45_3", $db)) {
		// die("Cannot connect to database"); 
	}
	
	if( !is_numeric($_GET["anz"]) ) {
		$anzahl = 5;
	} else {
		$anzahl = $_GET["anz"];
	}
	
	$query = @mysql_query("SELECT *, date_format(created, '%M %D, %Y') AS created_formatted FROM dropped_files ORDER BY rand() LIMIT " . $anzahl);
	
	while($random_rows = @mysql_fetch_array($query, MYSQL_ASSOC))
	{
	    echo $random_rows['id'] . ";";
	    echo $random_rows['ip'] . ";";
	    echo $random_rows['created_formatted'] . ";";
	    echo $random_rows['file_name_random'] . ";";
	    echo $random_rows['file_name'] . ";";
	    echo $random_rows['file_size'] . ";";
	    echo $random_rows['file_type'] . ";";
	    echo $random_rows['browser'] . "%%";
	}
?>